#ifndef STRUCT_H
#define STRUCT_H
#define BLOCK 32768 
//            long(4096*8)
#define Length         long(8192*256)
#define OrderCapacity  8192
#define OFFSET_OPEN 'O'
#define OFFSET_CLOSE 'C'

struct Snapshot
{
	long nano;
	long OpenInterest;
	int AskVolume1;
	int BidVolume1;
	int AskPrice1;
	int BidPrice1;
	int UpperLimitPrice;
	int LowerLimitPrice;
	int Volume;
	int Time;
} __attribute__((packed)); // 48 bytes

struct Order
{
	char symbol[16];
	char exchange[8];
	long md_nano;
	long process_nano;
	long order_nano;
	long sent_nano;
	long rtn_order_nano;
	long first_trade_nano;
	long last_trade_nano;
	double deal_price;
	double order_price;
	double entrust_price;
	int target_volume;
	int direction;
	int offset;
	int id;
	int deal_volume;
	int trade_times;
	int entrust_volume;
} __attribute__((packed)); // 132 bytes

#endif
